%@ Language=VBScript %> <% Option Explicit %> <% Response.Buffer = false %> <% 'on error resume next dim rsproducts, strsql, ID, objImage, iheight, iwidth, iratio, rsTitle, iCount, fPrice, rsCheck dim rscategory, rsSettings, storefont, rsoptions, aroptions, counter, arprice dim ardiscounts, rsDiscount, discount_ID, arusers, a, p Dim iPageSize 'How big our pages are Dim iPageCount 'The number of pages we get back Dim iPageCurrent 'The page we want to show Dim iRecordsShown 'Loop controller for displaying just iPageSize records Dim I 'Standard looping var set rssettings = server.CreateObject("ADODB.Recordset") rssettings.CursorLocation = adUseClient strsql = "SELECT * FROM [Settings]" set rssettings = conn.execute(strsql) ' Get parameters iPageSize = rssettings("MaxProds") ' Retrieve page to show or default to 1 If Request.QueryString("page") = "" Then iPageCurrent = 1 Else iPageCurrent = CInt(Request.QueryString("page")) End If ID = Request.querystring("Category_ID") session("Category_ID") = ID strsql = "stor_get_products " & ID & "," & iPageSize & "," & iPageCurrent set rsProducts = server.CreateObject("ADODB.Recordset") rsProducts.CursorLocation = adUseCLient set rsProducts = conn.execute(strsql) iCount = rsProducts("theCount") iPageCount = iCount \ iPagesize + 1 set rsProducts = rsProducts.NextRecordset If iPageCurrent > iPageCount Then iPageCurrent = iPageCount If iPageCurrent < 1 Then iPageCurrent = 1 set rscategory = server.CreateObject("ADODB.Recordset") rscategory.CursorLocation = adUseClient strsql = "stor_Category_select_ID " & ID set rscategory = conn.execute(strsql) storefont = rssettings("StoreFontFace") set rsTitle = server.CreateObject("ADODB.RECORDSET") rsTitle.CursorLocation = adUseClient strsql = "stor_Meta_Tag_select " & ID set rsTitle = conn.execute(strsql) %>
<% dim Meta_Title, Meta_Robots, Meta_Keywords if not rsTitle.EOF then Meta_Title = rsTitle("Meta_Title") Meta_Robots = rsTitle("Meta_Robots") Meta_Keywords = rsTitle("Meta_Keywords") end if %>|
No Products were found that matched your search query. Please try again." Else %> <% 'rsproducts.AbsolutePage = iPageCurrent if len(rscategory("sm_image")) > 4 then Response.Write(" ") else if len(rscategory("lg_image")) > 4 then Response.Write(" ") end if end if 'if (len(rscategory("sm_image")) < 4 and len(rscategory("lg_image")) < 4) or (rscategory("sm_Image") = "" and rscategory("Lg_image") = "") then Response.Write("" & rsCategory("Name") & "") 'end if if rsCategory("long_desc") > "" then response.Write(" " & rsCategory("long_desc") & " ") end if Response.Write("") %> <%if ipagecount > 1 then%> Page <%= iPageCurrent %> of <%= iPageCount %> <%end if%>
Page <%= iPageCurrent %> of <%= iPageCount %> <%end if%> <%end if %> |
|